package com.woniuxy.learnmap.mapper;

import com.woniuxy.commons.dto.LearnMapDto;
import com.woniuxy.commons.entity.LearnMap;
import org.apache.ibatis.annotations.Mapper;
import org.springframework.stereotype.Repository;

import java.util.List;

/**
 * @Auther: 王敞
 * @E-mail： 365799712@qq.com
 * @Date: 2020/07/16/16:44
 * @Description: learnmap mapper 接口
 */
@Mapper
@Repository
public interface LearnMapMapper {
    /*
    *
     * @Description: 添加一条学习地图
     * @Param: [learnMap]
     * @return: int
     * @Author: 王敞
     * @Date: 17:43 2020/7/16
     **/
    public int addLearnMap(LearnMap learnMap);
    /*
    *
     * @Description: 通过学习地图名字查询学习地图
     * @Param: [name]
     * @return: com.woniuxy.commons.entity.LearnMap
     * @Author: 王敞
     * @Date: 11:23 2020/7/21
     **/
    public LearnMap findLearnMapByName(String name);
    /*
    *
     * @Description: 分页查询学习地图
     * @Param: [index, pageSize]
     * @return: java.util.List<com.woniuxy.commons.dto.LearnMapDto>
     * @Author: 王敞
     * @Date: 14:26 2020/7/24
     **/
    public List<LearnMapDto> findLearnMapsByPage(int index, int pageSize);
    /*
    *
     * @Description: 查询学习地图的数量
     * @Param: []
     * @return: int
     * @Author: 王敞
     * @Date: 15:32 2020/7/24
     **/
    public int findTotalNumsOfMaps();

    public void del(int id);
}
